export const to = (url: string) => {
  wx.navigateTo({ url });
};
export const toast = (title: string) => {
  wx.showToast({
    title,
    icon: "none",
    mask: true,
  });
};
export const get = (key: string) => {
  return wx.getStorageSync(key);
};
export const set = (key: string, value: any) => {
  wx.setStorageSync(key, value);
};

export function err(err: any) {
  const logger = wx.getRealtimeLogManager();
  logger.error(err);
  throw new Error(err.message);
}
